#!/bin/bash

# Change the dictionary files in boundary in polymesh folder from walls to patch
changeDictionary

# Run the simulation in parallel and use pyFoamPlotRunner to generate plots
pyFoamPlotRunner.py sonicFoam

# Create the 'pyfoam' directory if it doesn't exist
mkdir -p pyfoam

# Move files starting with 'PyFoam' to the 'pyfoam' directory
mv PyFoam* pyfoam/ 2>/dev/null

# Move the 'Gnuplotting.analyzed' folder to the 'pyfoam' directory
mv Gnu* pyfoam/ 2>/dev/null

# Run parafoam
paraFoam

